package com.htd.erp.product;

import java.io.Serializable;
import java.util.List;

import javax.enterprise.context.ConversationScoped;
import javax.faces.model.DataModel;
import javax.inject.Named;

import com.htd.erp.common.EntityQuery;
import com.htd.erp.model.Product;
import com.htd.erp.web.JpaDataModel;

/**
 * @author Zhang Guilin
 *
 */
@Named
@ConversationScoped
public class ProductQuery extends EntityQuery<Product> implements Serializable {

	private static final long serialVersionUID = 1792012190446316429L;
	
	@Override
	public DataModel<Product> getDataModel() {
		return new JpaDataModel<Product>(Product.class, getEntityManager());
	}

	@Override
	public List<String> buildDataColumns() {
		return buildDataColumns("id", "name", "comments", "os", "specification");
	}
}
